package com.android.kotlincoroutinemvvmdemo.dialog
import android.os.Bundle
import android.util.Log
import com.android.kotlincoroutinemvvmdemo.R
import com.android.kotlincoroutinemvvmdemo.databinding.DialogTestDaynight3Binding

class TestDayNightDialogFragment2 : BaseDialogFragment2<DialogTestDaynight3Binding>() {

    override fun getLayoutId() = R.layout.dialog_test_daynight3

    override fun init(savedInstanceState: Bundle?) {

    }

    override fun adapterUIModeNightForDialog(uiModeNight: Boolean) {
        super.adapterUIModeNightForDialog(uiModeNight)
        if (uiModeNight) {
            mBinding.clDayNight.setBackgroundResource(R.drawable.layout_bg_04)
        } else {
            mBinding.clDayNight.setBackgroundResource(R.drawable.layout_bg_01)
        }
    }

    override fun onStart() {
        super.onStart()
        Log.d(TAG,"onStart")
    }

    override fun onStop() {
        super.onStop()
        Log.d(TAG,"onStop")
    }

    companion object {
        const val TAG = "TestDayNightDialogFragment2"
        fun newInstance() : TestDayNightDialogFragment2 {
            return TestDayNightDialogFragment2()
        }
    }
}